package com.bms.mapper;

import com.bms.common.request.BudgutReq;
import com.bms.entity.Budget;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface BudgetMapper {

    Integer getCount();

    Integer addBudget(Budget budget);

    int getSearchCount(Map<String, Object> params);

    List<Budget> searchBudgetsByPage(Map<String, Object> params);

    Integer updateBudget(Budget budget);

    Integer updateQL(Budget budget);

    Integer updateJZ(BudgutReq budget);

    List<Budget> getBudgetSelectList();

    Budget getBudgetByBudgetId(String budgetId);

    void updateUsedBudget(@Param("use") BigDecimal use, @Param("budgetId") String budgetId);

    List<Budget> selectBudgetByLineId(Budget budget);
}
